import request from '@/util/request'

export function createConversation(data) {
    return request({
        method: 'post',
        url: '/communication/message',
        data
    })
}

export function getMessageList(anotherId) {
    return request({
        method: 'get',
        url: '/communication/message/list',
        params:{
            anotherId
        }
    })
}

/**
 * 创建一个聊天消息列表
 * @param data
 * @returns {*}
 */
export function createChatListItem(data) {
    return request({
        method: 'post',
        url: '/communication/chatList',
        data
    })
}

export function getOpenChatLists() {
    return request({
        method: 'get',
        url: '/communication/chatList/open/list',
    })
}
